I just did it with bank of america stock. I made about 2.5% profit in 3 days. Not too bad
And no, you don't have to hold on to the stock for a specific amount of time.
They usually pay the dividend after the close on friday, so you have to hold the stock until monday.
Wow, it sounds like you have it all figured out. Buy a stock right before dividend day and then sell the day after the ex-day. If you can make a mere 1% a week, because many stocks pay over 4% yield and all you have to do is find an average of one per week. Then you can go and borrow all of the money you can get your hands on, and by 5 years out, by pyramiding the gains with your buying power, you should be a millionare many times over. I wonder why everybody isn't doing this, or maybe you are the first person to ever think of this idea.
Or maybe stocks that pay a dividend drop an average of slightly more than their dividend payout on ex-day. There is no free lunch or golden goose in this game. But if you think that you have found out something that is this easy, then by all means knock em dead.